/*
 *
 *
 *
 *
 */

package com.usefullc.user.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.usefullc.system.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;

@Entity(name="u_employee")
@ApiModel("员工")
@Data
public class Employee extends BaseEntity {


    @ApiModelProperty(notes = "工号")
    @Column(length = 50,nullable = false)
    private String jobNo;

    @ApiModelProperty(notes = "姓名")
    @Column(length = 50,nullable = false)
    private String name;

    @ApiModelProperty(notes = "座机号码")
    @Column(length = 50,nullable = false)
    private String phone;

    @JSONField(serialize = false)
    @ApiModelProperty(notes = "用户")
    @ManyToOne(cascade = CascadeType.REFRESH)
    @JoinColumn(name="userId")
    private User user;





    public Employee(){
    }

}
